import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';


import {NewForest} from "../../models/NewForest";
import {NewForestProvider} from "../../providers/new-forest/new-forest";
import {HttpClient} from "@angular/common/http";



/**
 * Generated class for the NewForestPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-new-forest',
  templateUrl: 'new-forest.html',
})
export class NewForestPage {
  newForest:NewForest;
  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              private ForestPro:NewForestProvider,
              private http:HttpClient
              ) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad NewForestPage');
    this.ForestPro.getData().subscribe(data=>{
      this.newForest=<NewForest>data
        }
    )
  }

}
